package me.jiatao.dagger2.model;

import javax.inject.Inject;

/**
 * Created by JiaTao on 2018/8/28.
 * Email: 535318720@qq.com
 * Version: 1.0
 * Description:
 */

public class Student {
    private String name;
    private int age;

    //注入Address 对象
    @Inject
    public Address address;

    @Inject
    public Student() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        String stuStr = "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", address=" + address +
                '}';

        System.err.println(stuStr);
        return stuStr;
    }
}
